<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="ensDataList.title"/></title>
    <meta name="heading" content="<fmt:message key='ensDataList.heading'/>"/>
    <meta name="menu" content="EnsDataMenu"/>
</head>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
        onclick="location.href='<c:url value="/ensDataform.html?method=Add&from=list"/>'"
        value="<fmt:message key="button.add"/>"/>

    <input type="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />
<div class="clear">
</div>
<div class="buttons" style="float:left;padding-right:15px;">

<form:form commandName="ensSearch" method="post" action="ensDataList.html">
     <fieldset style="width:118%;">
     <legend><fmt:message key="ensData.searchForm"/></legend>
     <table class="acdd">
     	<tr>
     		<td>
     			<form:input path="txtSearch"/>
     		</td>
             <td><form:select path="filterStatus" items="${listStatus }" itemValue="statusValue" itemLabel="statusLabel" />
             </td>
	     </tr>
	     <tr>
        <td>
         </td>
     </tr>
     </table>
     <button type="button" class="negative" id="searchForm_button_reset" style="float:right;height:34px;width:98px;" onclick="resetFields();">
             <fmt:message key="button.reset"/>
     </button>
     <button type="submit" class="searchb" id="searchForm_button_search" name="method:listLocalAcdd" style="float:right;height:34px;width:98px;" onClick="if(isTextSearchClick == 0) document.searchForm.textSearch.value=''">
             <fmt:message key="button.search"/>
     </button>
    </fieldset>
</form:form>
</div>
<div class="clear">
</div>

<display:table name="ensDataList" cellspacing="0" cellpadding="0" defaultsort="1" id="ensData" pagesize="25" class="table" export="true">
    <display:column property="traderReferenceId" escapeXml="true" sortable="true" titleKey="ensData.traderReferenceId" style="width: 23%" 
        url="/viewEnsDataDetail.html?from=list" paramId="id" paramProperty="id"/>
	<display:column property="createdOn" format="{0,date,dd/MM/yyyy HH:mm:ss}" sortable="true" titleKey="ensData.createdOn" style="width: 30%"/>
    <display:column property="messageId" escapeXml="true" sortable="true" titleKey="ensData.messageId" style="width: 17%"/>
    <display:column sortable="true" titleKey="ensData.currentEnsStatus" style="width: 30%">
    	<fmt:message key="ensData.status.${ensData.currentEnsStatus.statusCode}" />
    </display:column>
    <display:column  style="width: 10%" titleKey="ensData.detail">View Detail
	    <spring:url value="viewEnsDataDetail" var="detailUrl"  >
	    	<spring:param name="ensId"><c:out value="${ensData.id}" escapeXml="false"/></spring:param>
	    </spring:url>
    </display:column>
    
    
    <display:setProperty name="paging.banner.item_name" value="ensData"/>
    <display:setProperty name="paging.banner.items_name" value="ensDatas"/>

    <display:setProperty name="export.excel.filename" value="ENSData List.xls"/>
    <display:setProperty name="export.csv.filename" value="ENSData List.csv"/>
    <display:setProperty name="export.pdf.filename" value="ENSData List.pdf"/>
</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("ensData");
</script>
